import { computed, ref } from 'vue'
import { useStore } from 'vuex'
import get from 'lodash/get'
import { ObjectType } from 'typings/interfaces'

function useUserOrgTree() {
  const loading = ref<boolean>(false)
  const store = useStore()
  const userOrgTree = computed<ObjectType>(() => store.getters.userOrgTree)

  return {
    loading,
    userOrgTree,
  }
}

export default useUserOrgTree
